Skip to content

mcp-neo4j-memory SSE Support, docker stdio/sse images, extensive test coverage #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

mlesyk
Copy link

@mlesyk mlesyk commented Jun 9, 2025

Tested sse/stdio with LibreChat integration and Claude Desktop

Key Features

Multiple protocols: stdio (Claude Desktop) + SSE (streaming apps)
✅ Tested with LibreChat integration, with Claude Desktop SSE and STDIO options
Extensive test coverage with ability to run isolated on docker
✅ Production ready docker images
Easy integration: LibreChat, Claude Desktop, or standalone

Quick Start on local machine

# Setup env
uv venv
.venv\Scripts\activate
uv pip install -e ".[dev]"

# Set environment for tests
set NEO4J_URL=neo4j://localhost:7687
set NEO4J_USERNAME=neo4j
set NEO4J_PASSWORD=testpassword

# Run neo4j
docker run -d --name neo4j-test -p 7687:7687 -p 7474:7474 -e NEO4J_AUTH=neo4j/testpassword neo4j:latest

# Run tests
uv run pytest

# Run STDIO mode mcp_neo4j_memory
python -m mcp_neo4j_memory

# Run SSE mode mcp_neo4j_memory
python -m mcp_neo4j_memory --mode sse --port 3001

# Alternative
python -m mcp_neo4j_memory \
  --mode sse \
  --db-url neo4j://localhost:7687 \
  --username neo4j \
  --password your_password \
  --port 3001

Quick Start with Docker

# 1. Build and run tests, clean
./scripts/test.sh build
./scripts/test.sh
./scripts/test.sh clean

# 2. Build Docker images 
./scripts/build.sh all

# Run neo4j
docker run -d --name neo4j-test -p 7687:7687 -p 7474:7474 -e NEO4J_AUTH=neo4j/testpassword neo4j:latest

# Run mcp-neo4j-memory image in stdio mode
docker run -it -p 3001:3001 -e NEO4J_URL=bolt://host.docker.internal:7687 -e NEO4J_USERNAME=neo4j -e NEO4J_PASSWORD=testpassword mcp-neo4j-memory:latest

# Run mcp-neo4j-memory image in sse mode
docker run -it -p 3001:3001 -e NEO4J_URL=bolt://host.docker.internal:7687 -e NEO4J_USERNAME=neo4j -e NEO4J_PASSWORD=testpassword mcp-neo4j-memory:sse

# 3. Publish Docker images 
./scripts/publish.sh

See Usage examples in `examples` directory

Try run using my docker image from dockerhub
# Run mcp-neo4j-memory image in stdio mode
docker run -it -p 3001:3001 -e NEO4J_URL=bolt://host.docker.internal:7687 -e NEO4J_USERNAME=neo4j -e NEO4J_PASSWORD=testpassword lesykm/mcp-neo4j-memory:latest

# Run mcp-neo4j-memory image in sse mode
docker run -it -p 3001:3001 -e NEO4J_URL=bolt://host.docker.internal:7687 -e NEO4J_USERNAME=neo4j -e NEO4J_PASSWORD=testpassword lesykm/mcp-neo4j-memory:sse

mlesyk added 4 commits June 8, 2025 04:57
…eaming alongside existing stdio transport

Key additions:
- MCP-compliant SSE server with FastAPI and session management
- Multi-protocol CLI with --mode [stdio|sse] selection
- Optimized Docker containers with separate stdio/sse variants
- Full MCP compliance testing and SSE transport validation

Benefits:
- Web browser compatibility with native SSE connections
- Real-time streaming responses for interactive experiences
- Backward compatible - stdio remains default protocol
@mlesyk mlesyk mentioned this pull request Jun 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant